xl: fix vcpus to vnode assignement in config file
In fact, right now, the following (legitimate)
configuration:
vcpus = '4'
vnuma = [ [ "pnode=0","size=512","vcpus=0,1","vdistances=10,20" ],
[ "pnode=1","size=512","vcpus=2,3","vdistances=20,10" ] ]
Produces the following error:
# xl create /etc/xen/test.cfg
Parsing config from /etc/xen/test.cfg
xl: maxvcpus < vcpu
That is because, we only process the first element of the
"vcpus=" list (of each vnode specification). Therefore,
in the above case, we only see 2 vcpus, out of 4, being
assigned to the vnodes, and hence the error.
What we need is either a multidimentional array, or a
bitmap, to temporary store the vcpus of a vnode, while
parsing the vnuma config entry. Let's use the latter,
which happens to also make it easier to copy the outcome
of the parsing to its final destination in b_info, if
everything goes ok.
Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>